import request from '@/utils/request2'
/*
改文件的创建：是为了前台和后台的交互，数据的互相传递
*/
// 查询未遂事故列表
export function fetchImproveList(query) {
  return request({
    url: '/ehs_disaster_improve/list',
    method: 'get',
    baseURL: process.env.VUE_APP_BASE_API2,
    params: query
  })
}
// 伪删除未遂事故，根据未遂事故的主键faultId
export function deleteImproveList(dimpId) {
  return request({
    url: '/ehs_disaster_improve/delete',
    method: 'get',
    baseURL: process.env.VUE_APP_BASE_API2,
    params: { dimpId }
  })
}
// 查询总数量
export function fetchAllCount() {
  return request({
    url: '/ehs_improve/listcount',
    method: 'get',
    baseURL: process.env.VUE_APP_BASE_API2

  })
}

// 未遂事故修改页面提交
export function editImproveList(query) {
  return request({
    url: '/ehs_disaster_improve/edit',
    method: 'post',
    baseURL: process.env.VUE_APP_BASE_API2,
    params: query
  })
}
// getFaultNameList
// 获取未遂事故列表
export function getFaultNameList() {
  return request({
    url: '/ehs_disaster/faulttitle',
    method: 'get',
    baseURL: process.env.VUE_APP_BASE_API2

  })
}
// 新增createInquery
export function createInquery(query) {
  return request({
    url: '/ehs_disaster_improve/add',
    method: 'post',
    baseURL: process.env.VUE_APP_BASE_API2,
    params: query
  })
}
// 获取人员列表
export function getPersonList() {
  return request({
    url: '/ehs_improve/personlist',
    method: 'get',
    baseURL: process.env.VUE_APP_BASE_API2

  })
}
getDeptList
// 获取部门列表
export function getDeptList() {
  return request({
    url: '/ehs_improve/deptlist',
    method: 'get',
    baseURL: process.env.VUE_APP_BASE_API2

  })
}
